{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "# 集成学习"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn import datasets\n",
    "\n",
    "X, y = datasets.make_moons(n_samples=500, noise=0.3, random_state=42)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX8AAAD8CAYAAACfF6SlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4xLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvAOZPmwAAIABJREFUeJztnXucHNV153+nWz1SDyQzejlCI8lSsixeCEKyHsErrW3AvIwRA5gRJk7sxLbwYptYzgrE2isGxbH12A34xTqyzAecYKPBiGEw8BEYSIjkYDOyXghbyytCGoFBiJGRpqV59N0/qqunuureW7ce3V3dfb6fjz6arq6uulXVfe6550lCCDAMwzCNRaraA2AYhmEqDwt/hmGYBoSFP8MwTAPCwp9hGKYBYeHPMAzTgLDwZxiGaUBY+DMMwzQgLPwZhmEaEBb+DMMwDciYag9AxaRJk8TMmTOrPQyGYZiaYvv27YeFEJP99kus8J85cyZ6e3urPQyGYZiagoj2m+zHZh+GYZgGhIU/wzBMA8LCn2EYpgFh4c8wDNOAsPBnGIZpQFj4MwzDNCCJDfVk4qF7Rx/Wb9mHQ/05TG3NYsXFZ6B9blu1h8UwTJVh4V/HdO/owy2b9yA3NAIA6OvP4ZbNewCAJwCGaXDY7FPHrN+yryj4bXJDI1i/ZV+VRsQwTFJg4V/HHOrPBdrOMEzjwMK/jpnamg20nWGY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piqBRGNI6JfEdGuwr24LcjnWfgnn+cBXAXgmWoPpNIQURrA9wBcCuBMAJ8gojOrO6qqcTeAS6o9iAQwDOBvhRBnAjgXwBca+DtxEsD5QohzAMwBcAkRnWv6YRb+CUcI8RshxL5qj6NKLATwkhDiFSHEIID7AFxR5TFVBSHEMwCOVHsc1UYI8boQ4teFv98F8BsAbdUdVXUQFscKLzOFf8ZOXBb+TJJpA3DA8fogGvSHznghopkA5gL4ZXVHUj2IKE1EOwG8CeAJIYTxveA2jgmAiH4OYIrkra8KIR6q9HgYJukQ0akAHgDwZSHE76s9nmohhBgBMIeIWgE8SER/KoQw8gux8E8AQoiPVHsMCaUPwHTH62mFbUwDQ0QZWIL/XiHE5mqPJwkIIfqJ6GlYfiEj4c9mHybJPAfgdCKaRURNAK4F0FPlMTFVhIgIwA8B/EYI8Q/VHk81IaLJBY0fRJQFcCGA35p+noV/wiGiK4noIIAPAHiEiLZUe0yVQggxDOCLALbAcux1CSH2VndU1YGIfgLg3wGcQUQHiegz1R5TlVgE4C8AnE9EOwv/PlrtQVWJ0wA8TUS7YSlKTwghfmb6Yc7wZRiGaUBY82cYhmlAWPgzDMM0ICz8GYZhGhAW/gzDMA0IC3+GYZgGhIU/wzBMA8LCn2EYpgFh4c8wDNOA/H+Qm2+2pJ48TAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1090fc5c0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(X[y==0,0],X[y==0,1])\n",
    "plt.scatter(X[y==1,0],X[y==1,1])\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.model_selection._split import train_test_split\n",
    "\n",
    "X_train,X_test, y_train, y_test = train_test_split(X, y, random_state=42)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 先使用逻辑回归来看看效果"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.86399999999999999"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.linear_model.logistic import LogisticRegression\n",
    "\n",
    "log_clf = LogisticRegression()\n",
    "log_clf.fit(X_train, y_train)\n",
    "log_clf.score(X_test,y_test)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 使用SVM看看效果"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.88800000000000001"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.svm.classes import SVC\n",
    "\n",
    "svm_clf = SVC()\n",
    "svm_clf.fit(X_train, y_train)\n",
    "svm_clf.score(X_test, y_test)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 使用决策树看效果"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.872"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.tree.tree import DecisionTreeClassifier\n",
    "\n",
    "dt_clf = DecisionTreeClassifier()\n",
    "dt_clf.fit(X_train, y_train)\n",
    "dt_clf.score(X_test, y_test)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 手写的集成学习"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "y_predict_1 = log_clf.predict(X_test)\n",
    "y_predict_2 = svm_clf.predict(X_test)\n",
    "y_predict_3 = dt_clf.predict(X_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 3组结果向量，少数服从多数\n",
    "y_predict = np.array((y_predict_1 + y_predict_2 + y_predict_3) >= 2, dtype=int)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1, 0, 0, 1, 1, 1, 0, 0, 0, 0])"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y_predict[:10]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 手写的集成学习效果对比单纯使用逻辑回归，SVM，决策树的对比如何？"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.89600000000000002"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.metrics.classification import accuracy_score\n",
    "\n",
    "accuracy_score(y_test, y_predict)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "准确率比只使用逻辑回归，svm，决策树的其中一种时高"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## scikit-learn中的集成学习：Voting Classifier"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.ensemble.voting_classifier import VotingClassifier\n",
    "\n",
    "# hard就是少数服从多数\n",
    "voting_clf = VotingClassifier(estimators=[\n",
    "    ('log_clf', LogisticRegression()),\n",
    "    ('svm_clf',SVC()),\n",
    "    ('dt_clf',DecisionTreeClassifier())\n",
    "], voting='hard')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.89600000000000002"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "voting_clf.fit(X_train, y_train)\n",
    "voting_clf.score(X_test, y_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
